﻿using Simple.Tools.Map;
using Simple.Tools.SnowFlake;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApp
/// <summary>
/// 版 本 钢易智企2.0 V 2.0.0 钢易智企2.0
/// Copyright (c) 2023 杭州钢易科技有限公司
/// 创建人：曾东明
/// 日 期：2024
/// 描 述：
/// </summary>
{
    public class SysUserEntity
    {
		/// <summary>
		/// 
		/// </summary>
		/// <param name="IsCreate"></param>
		public SysUserEntity(bool IsCreate = false)
		{
			if (IsCreate)
			{
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public SysUserEntity() : this(false)
		{

		}
		/// <summary>
		/// 账号
		/// </summary>
        public string Account { get; set; }

		
		/// <summary>
		/// 密码 key
		/// </summary>

		public string Password { get; set; }
		/// <summary>
		/// 密码 salt
		/// </summary>

		public string SaltPassword { get; set; }
		/// <summary>
		/// 年龄
		/// </summary>

		public int Age { get; set; }

		/// <summary>
		/// 用户名
		/// </summary>
		public string UserName { get; set; }
		[MapAdd("Addaaa")]
		public List<TestA> aaa { get; set; }

		[MapAdd("AddMap")]
		public Dictionary<string,TestA> map { get; set; }

		/// <summary>
		/// 
		/// </summary>
		/// <param name="value"></param>
		public void Addaaa(object value)
		{
			if (value is TestA a)
			{
				if (value != null)
				{
					aaa.Add(a);
				}
			}
		}


		public void AddMap(object key,object value)
		{
			if (key is string k&& value is TestA v)
			{
				map.Add(k,v);
			}
		}


	}
}
